package com.hainatong.shiphelper;

import com.blankj.utilcode.util.StringUtils;


import android.content.Context;
import com.hainatong.shiphelper.login.model.UserInfo;

public class GlobalConfig
{

    private Context mContext;

    private static GlobalConfig sInstance;

    //
    private String token;

    private boolean isIMLogin = false;
    //用户信息
    private UserInfo.DataBean userInfo;


    private GlobalConfig()
    {
    }

    /**
     *
     */
    public static GlobalConfig getInstance()
    {
        if (sInstance == null)
        {
            sInstance = new GlobalConfig();
        }
        return sInstance;
    }


    public void setmContext(Context mContext)
    {
        this.mContext = mContext;
    }

    public Context getContext()
    {
      return this.mContext;
    }


    public String getToken()
    {
        return token;
    }

    public boolean isLogin()
    {
        return !StringUtils.isEmpty( token );
    }

    public void setToken(String token)
    {
        this.token = token;
    }

    public void clearToken()
    {
        this.token = "";
    }


    public boolean isIMLogin()
    {
        return isIMLogin;
    }

    public void setIMLogin(boolean IMLogin)
    {
        isIMLogin = IMLogin;
    }


    public  UserInfo.DataBean getUserInfo()
    {
        return userInfo;
    }

    public  void setUserInfo(UserInfo.DataBean userInfo)
    {
       this.userInfo = userInfo;
    }
}
